package com.shangjinrong.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
    * 借款信息表
    */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "borrow_info")
public class BorrowInfo {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 借款用户id
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 借款金额
     */
    @TableField(value = "amount")
    private BigDecimal amount;

    /**
     * 借款期限
     */
    @TableField(value = "period")
    private Integer period;

    /**
     * 年化利率
     */
    @TableField(value = "borrow_year_rate")
    private BigDecimal borrowYearRate;

    /**
     * 还款方式 1-等额本息 2-等额本金 3-每月还息一次还本 4-一次还本
     */
    @TableField(value = "return_method")
    private Byte returnMethod;

    /**
     * 资金用途
     */
    @TableField(value = "money_use")
    private Byte moneyUse;

    /**
     * 状态（0：未提交，1：审核中， 2：审核通过， -1：审核不通过）
     */
    @TableField(value = "status")
    private Byte status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 逻辑删除(1:已删除，0:未删除)
     */
    @TableField(value = "is_deleted")
    @TableLogic
    private Boolean isDeleted;

    public static final String COL_ID = "id";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_AMOUNT = "amount";

    public static final String COL_PERIOD = "period";

    public static final String COL_BORROW_YEAR_RATE = "borrow_year_rate";

    public static final String COL_RETURN_METHOD = "return_method";

    public static final String COL_MONEY_USE = "money_use";

    public static final String COL_STATUS = "status";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_IS_DELETED = "is_deleted";
}